package com.sunny;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        while (true){
            Scanner scanner = new Scanner(System.in);
            double in = scanner.nextDouble();
            System.out.println(getResult(in));
        }

    }


    public static double getResult(double x){

        x = 1.0*(x-1)/(x+1);

        double result;
        double x3 = x*x*x;
        System.out.println(x3);
        double x5 = x3*x*x;
        System.out.println(x5);
        result = x + x3/3 + x5/5;
        return 2*result;

    }
}
